package com.mao.other;

/**
 * @author Totoro
 * @date 2020/7/6
 * @explain:
 */
public class ThreadState {
    public static void main(String[] args) {
        Thread thread = new Thread(()->{
           // while (true){
                System.out.println("线程启动");
                try {
                    Thread.sleep(0);
                }catch (InterruptedException e){
                    e.printStackTrace();
                }
            //}
        });
        thread.start();

        for (int i = 0; i < 10000; i++) {
            System.out.println(thread.getState());
        }

        Thread.State state = thread.getState();
    }
}
